package com.example.blog.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.servlet.http.HttpServletRequest;

@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName("operational_logs")
public class OperationalLogs {
    private String content;
    @TableId(type = IdType.AUTO)
    private Long id;
    private String ip;
    private String address;
    private String admin;
    private String time;
    private Integer type; //1 新增 -1 删除  0 修改
    private Integer outcome;
    private String user;

    public OperationalLogs(Integer type, Integer outcome, String admin, String user, String content) {
        this.outcome = outcome;
        this.type = type;
        this.admin = admin;
        this.user = user;
        this.content = content;
    }

    public OperationalLogs(Integer type, Integer outcome, String content, String admin, String user, String ip, String address) {
        this.content = content;
        this.admin = admin;
        this.type = type;
        this.outcome = outcome;
        this.user = user;
        this.address = address;
        this.ip = ip;
    }
}
